package com.linkelee.server.controller.base;


import com.linkelee.api.model.sys.SysUser;
import lombok.extern.slf4j.Slf4j;
import org.apache.shiro.SecurityUtils;


/**
 * Controller公共组件
 *
 * @author lsl 154751575@qq.com
 */
@Slf4j
public abstract class AbstractController {
	
	protected SysUser getUser() {
		return (SysUser) SecurityUtils.getSubject().getPrincipal();
	}

	protected Long getUserId() {
		return getUser().getUserId();
	}
}
